<template>
    <div class="line">
        <div ref="myChart" style="width: 750px; height: 300px"></div>
    </div>
</template>

<style lang="scss">
    .line {
        margin-left: 50px ;
    }
</style>
<script>
export default {
    data() {
        return {

        }
    },
    mounted() {
        this.setChart()
    },
    methods: {
        setChart() {
            let myChart = this.$echarts.init(this.$refs.myChart);
            let option = {
                title: {
                    text: "销售总金额",
                },
			tooltip: {},

                xAxis: {
				type: 'category',
				data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
			},
				yAxis: {
					type: 'value'
				},
				series: [{
					data: [40000, 70000, 20000, 30000, 88888, 100000, 40000, 70000, 20000, 30000, 88888, 20000],
					type: 'line'
				}]
			}
			myChart.setOption(option)
		}
	}
}
</script>